import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '../views/pages/HomeView.vue'

export const routes = [
  {
    path: '/',
    name: 'home',
    meta: {
      title: '首页'
    },
    component: HomeView
  },
  {
    path: '/example',
    name: 'example',
    meta: {
      title: '案例一'
    },
    component: () => import('../views/pages/Example.vue')
  },
  {
    path: '/emoji',
    name: 'emoji',
    meta: {
      title: '案例二：emoji'
    },
    component: () => import('../views/pages/Emoji.vue')
  }
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes
})

export default router
